package com.zhijian.medical.controller;


import com.zhijian.medical.api.CommonResult;
import com.zhijian.medical.entity.po.ExperimentProcessSampleLog;
import com.zhijian.medical.holder.CurrentUserHolder;
import com.zhijian.medical.service.ExperimentProcessSampleLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author li xiao dong
 * @since 2022-08-26
 */
@Slf4j
@RestController
@Api(tags = "样本追踪")
@RequestMapping("/experiment")
public class ExperimentProcessSampleLogController {

    @Autowired
    private ExperimentProcessSampleLogService service;

    @GetMapping("/sample/log/{sampleId}")
    @ApiOperation("列表")
    public CommonResult<List<ExperimentProcessSampleLog>> list(@PathVariable("sampleId") Long sampleId) {

        return CommonResult.success(service.list(sampleId));
    }
}

